package qlsl.androiddesign.adapter.subadapter;

import java.util.HashMap;
import java.util.List;

import com.qlsl.androiddesign.kuaiwa.R;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import qlsl.androiddesign.activity.baseactivity.BaseActivity;
import qlsl.androiddesign.adapter.baseadapter.BaseAdapter;

/**
 * 二手车详情列表<br/>
 *
 */
public class CarDetailAdapter extends BaseAdapter<HashMap<String, String>> {

	public CarDetailAdapter(BaseActivity activity, List<HashMap<String, String>> list) {
		super(activity, list);
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		convertView = getItemView(convertView, R.layout.listitem_car_detail);

		TextView tv_text = getView(convertView, R.id.tv_text);
		TextView tv_text_content = getView(convertView, R.id.tv_text_content);

		HashMap<String, String> map = getItem(position);
		String name = map.get("name");
		String content = map.get("content");

		tv_text.setText(name);
		tv_text_content.setText(content);

		return convertView;
	}
}
